package net.kelissa.jenetic.example.salesman;

import net.kelissa.jenetic.Gene;
import net.kelissa.jenetic.impl.gene.GeneValueBase;

public class GeneSalesman extends GeneValueBase<SalesmanValue>
{

  public GeneSalesman(SalesmanValue value)
  {
    super(value);
  }

  @Override
  public void mutate()
  {
    throw new RuntimeException("GeneString is not mutable");
  }

  @Override
  public Gene clone()
  {
    return new GeneSalesman(this.value);
  }

  @Override
  public int compareTo(Gene other)
  {
    SalesmanValue otherValue = ((GeneSalesman)other).getValue();
    return this.value.compareTo(otherValue);
  }

}
